package edu.pku.sei.transformation.mtparser;

import lpg.runtime.*;

/**
 *<b>
 *<li>Rule 56:  ParenAtomicExpr ::= ( Expression )
 *</b>
 */
public class ParenAtomicExpr extends Ast implements IParenAtomicExpr
{
    private IExpression _Expression;

    public IExpression getExpression() { return _Expression; }

    public ParenAtomicExpr(IToken leftIToken, IToken rightIToken,
                           IExpression _Expression)
    {
        super(leftIToken, rightIToken);

        this._Expression = _Expression;
        initialize();
    }

    public boolean equals(Object o)
    {
        if (o == this) return true;
        if (! (o instanceof ParenAtomicExpr)) return false;
        if (! super.equals(o)) return false;
        ParenAtomicExpr other = (ParenAtomicExpr) o;
        if (! _Expression.equals(other._Expression)) return false;
        return true;
    }

    public int hashCode()
    {
        int hash = super.hashCode();
        hash = hash * 31 + (_Expression.hashCode());
        return hash;
    }

    public void accept(Visitor v) { v.visit(this); }
    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
    public Object accept(ResultVisitor v) { return v.visit(this); }
    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
}


